// vite.config.mjs
import { resolve } from "path";
import { defineConfig, loadEnv } from "file:///D:/bishe/HuaduLivingPlatform/huadu_web/node_modules/vite/dist/node/index.js";
import vue from "file:///D:/bishe/HuaduLivingPlatform/huadu_web/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import Components from "file:///D:/bishe/HuaduLivingPlatform/huadu_web/node_modules/unplugin-vue-components/dist/vite.js";
import VueJSX from "file:///D:/bishe/HuaduLivingPlatform/huadu_web/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs";
import AutoImport from "file:///D:/bishe/HuaduLivingPlatform/huadu_web/node_modules/unplugin-auto-import/dist/vite.js";
import vueSetupExtend from "file:///D:/bishe/HuaduLivingPlatform/huadu_web/node_modules/vite-plugin-vue-setup-extend/dist/index.mjs";
import { visualizer } from "file:///D:/bishe/HuaduLivingPlatform/huadu_web/node_modules/rollup-plugin-visualizer/dist/plugin/index.js";
import Less2CssVariablePlugin from "file:///D:/bishe/HuaduLivingPlatform/huadu_web/node_modules/antd-less-to-css-variable/dist/index.js";
import viteCompression from "file:///D:/bishe/HuaduLivingPlatform/huadu_web/node_modules/vite-plugin-compression/dist/index.mjs";
import { theme } from "file:///D:/bishe/HuaduLivingPlatform/huadu_web/node_modules/ant-design-vue/lib/index.js";
import convertLegacyToken from "file:///D:/bishe/HuaduLivingPlatform/huadu_web/node_modules/ant-design-vue/lib/theme/convertLegacyToken.js";
var __vite_injected_original_dirname = "D:\\bishe\\HuaduLivingPlatform\\huadu_web";
var { defaultAlgorithm, defaultSeed } = theme;
var mapToken = defaultAlgorithm(defaultSeed);
var v3Token = convertLegacyToken.default(mapToken);
var r = (...args) => resolve(__vite_injected_original_dirname, ".", ...args);
var vite_config_default = defineConfig(({ command, mode }) => {
  const envConfig = loadEnv(mode, "./");
  const alias = {
    "~": `${resolve(__vite_injected_original_dirname, "./")}`,
    "@/": `${resolve(__vite_injected_original_dirname, "src")}/`
  };
  return {
    server: {
      port: envConfig.VITE_PORT,
      proxy: {
        "/api": {
          target: envConfig.VITE_API_BASEURL,
          ws: false,
          changeOrigin: true,
          rewrite: (path) => path.replace(/^\/api/, "")
        }
      }
    },
    resolve: {
      alias
    },
    // 解决警告You are running the esm-bundler build of vue-i18n.
    define: {
      __VUE_I18N_FULL_INSTALL__: true,
      __VUE_I18N_LEGACY_API__: true,
      __VUE_I18N_PROD_DEVTOOLS__: true,
      __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: true
    },
    build: {
      // sourcemap: true,
      manifest: true,
      brotliSize: false,
      rollupOptions: {
        output: {
          manualChunks: {
            echarts: ["echarts"],
            "ant-design-vue": ["ant-design-vue"],
            vue: ["vue", "vue-router", "pinia", "vue-i18n"]
          }
        }
      },
      chunkSizeWarningLimit: 1e3
    },
    plugins: [
      vue({
        script: {
          refTransform: true
        }
      }),
      viteCompression(),
      vueSetupExtend(),
      VueJSX(),
      AutoImport({
        imports: ["vue"],
        dirs: ["./src/utils/permission"],
        dts: r("src/auto-imports.d.ts")
      }),
      // 组件按需引入
      Components(
        {
          dirs: [r("src/components")],
          dts: false,
          resolvers: []
        },
        {
          dirs: [r("src/components/HomeCard")],
          dts: false,
          resolvers: []
        }
      ),
      visualizer()
    ],
    css: {
      preprocessorOptions: {
        less: {
          javascriptEnabled: true,
          plugins: [
            new Less2CssVariablePlugin({
              // TODO：有必要用的情况下，是否需要传入 variables，可能会造成重复引用
              variables: { ...v3Token }
            })
          ],
          modifyVars: v3Token
        }
      }
    },
    optimizeDeps: {}
  };
});
export {
  vite_config_default as default,
  r
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcubWpzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZGlybmFtZSA9IFwiRDpcXFxcYmlzaGVcXFxcSHVhZHVMaXZpbmdQbGF0Zm9ybVxcXFxodWFkdV93ZWJcIjtjb25zdCBfX3Zp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